require("Common/define");
require("Common/functions");
require("Controller/BackGround");
require("Controller/PlayerManager");
require("Controller/EnemyFactory");
require("Controller/DestroyCollider");
require("View/BattlePanel");
require("View/SettingPanel");








------------------------------------------
GameRoot = {};
local this = GameRoot;
local transform;

function GameRoot.OnAwake()
 
  BackGround.New();
  DestroyCollider.New();
  BattlePanel.New();
	resMgr:LoadPrefab("prefabs", {"PlayerBullet","EnemyBullet"}, this.LoadOK);

 
 
end
local playerBulletPrefab;
local enemyBulletPrefab;
function GameRoot.LoadOK(objs)
  playerBulletPrefab = objs[0];
	enemyBulletPrefab = objs[1];

	poolMgr:CreatePool("PlayerBullet",1,10,playerBulletPrefab);
  poolMgr:CreatePool("EnemyBullet",1,10,enemyBulletPrefab);
  
  PlayerManager.New(); 
  EnemyFactory.New();
end
  
